package cn.com.gof.behavior.observer;

/**
 * <p>Title: Client</p>  
 * <p>Description: </p>  
 * @author WangJun
 * @date 2018年9月10日 下午3:37:53
 */
public class Client {
	public static void main(String[] args) {
		ConcreteSubject cSubject = new ConcreteSubject();
		
		ObserverA a = new ObserverA(); 
		ObserverA b = new ObserverA(); 
		ObserverA c = new ObserverA(); 
		
		cSubject.register(a);
		cSubject.register(b);
		cSubject.register(c);
		
		cSubject.setState(3000);
		
		System.out.println(a.getMyState());
		System.out.println(b.getMyState());
		System.out.println(c.getMyState());
	}
}
